#include <stdafx.h>
#include "res.h"
#include "mainwindow.h"

int WINAPI WinMain (HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR lpszArgument,
                     int nCmdShow)
{
	GdiplusStartupInput gdiplusStartupInput;
	ULONG_PTR gdiplusToken;
	GdiplusStartup( &gdiplusToken, &gdiplusStartupInput, NULL );
	const TCHAR szLWind[] = TEXT( "VeryNotesWin" );
	const TCHAR szName [] = TEXT( "Very Notes" );

	CMainWindow win;
	win.CreateEx(NULL, szLWind, szName, WS_POPUP & ~WS_BORDER,
					NULL, NULL, 640, 480, NULL, (HMENU)0, hInstance);

	::UpdateWindow(win.m_hWnd);

	MSG msg;

	while ( ::GetMessage( & msg, NULL, 0, 0 ) )
	{
		::TranslateMessage( & msg );
		::DispatchMessage( & msg );
	}

//	return msg.wParam;
//	win.MsgLoop();
 	GdiplusShutdown(gdiplusToken);
	return msg.wParam;
}
